﻿<%-- http://examples1.ext.net/#/Panel/Basic/IFrame_Communication/ --%>

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Admin.aspx.cs" Inherits="IU.Admin.Admin" %>
<%@ Register assembly="Ext.Net" namespace="Ext.Net" tagprefix="ext" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Módulo de administración</title>
    <script type="text/javascript" src="../js/util.js"></script>
</head>
<body>
<form id="Form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    
    <ext:Viewport ID="Viewport1" runat="server" Layout="border">
        <Items>
            <ext:Panel ID="Panel1" 
                runat="server"
                Region="North"
                Height="32">
                <TopBar>
                    <ext:Toolbar ID="Toolbar1" runat="server">
                    <Items>
                        <ext:LinkButton ID="LinkButtonHome" runat="server" Text="Principal" Icon="House" Target="_blank" NavigateUrl="../Default.aspx"> 
                        </ext:LinkButton>
                        <ext:ToolbarSpacer Width="8" ID="ToolbarSpacer1"></ext:ToolbarSpacer>
                        <ext:LinkButton ID="LinkButtonLogout" runat="server" Text="Logout" Icon="DoorOut"> 
                            <DirectEvents>
                                <Click OnEvent="ButtonLogout_Click"></Click>
                            </DirectEvents>
                        </ext:LinkButton>
                    </Items>
                    </ext:Toolbar>
                </TopBar>
                <Items>
                </Items>
            </ext:Panel>
            <ext:Panel ID="Panel2" 
                runat="server" 
                Title="Menú principal" 
                Region="West"
                Layout="accordion"
                Width="275" 
                MinWidth="200" 
                MaxWidth="500" 
                Split="true"  
                AnimCollapse="true"
                Collapsible="true">
                <Defaults>
                    <ext:Parameter Name="Border" Value="false"></ext:Parameter>
                    <ext:Parameter Name="Collapsed" Value="true"></ext:Parameter>
                    <ext:Parameter Name="Padding" Value="6"></ext:Parameter>
                </Defaults>
                <Items>
                    <ext:Panel ID="PanelEmpresas" runat="server" 
                        Icon="UserSuitBlack"
                        Title="Empresas">
                        <CustomConfig>
                            <ext:ConfigItem Name="width" Value="20%" Mode="Value" />
                            <ext:ConfigItem Name="height" Value="100%" Mode="Value" />
                        </CustomConfig>
                        <Items>
                            <ext:MenuPanel ID="MenuPanel3" runat="server">
                            <Menu ID="Menu2" runat="server">
                            <Items>
                                <ext:MenuItem Text="Crear empresa" Icon="TableAdd">
                                    <Listeners>
                                        <Click Handler="addTab(#{TabPanel1}, 'Crear empresa', 'Tabs/CrearEmpresa.aspx');" />
                                    </Listeners>
                                </ext:MenuItem>
                                <ext:MenuItem Text="Listar empresas" Icon="TableMultiple">
                                    <Listeners>
                                        <Click Handler="addTab(#{TabPanel1}, 'Listar empresas', 'Tabs/ListarEmpresas.aspx');" />
                                    </Listeners>
                                </ext:MenuItem>
                            </Items>
                            </Menu>
                            </ext:MenuPanel>
                        </Items>
                    </ext:Panel>
                    
                    <ext:Panel ID="PanelUsuarios" runat="server" 
                        Icon="User"
                        Title="Usuarios">
                        <CustomConfig>
                            <ext:ConfigItem Name="width" Value="20%" Mode="Value" />
                            <ext:ConfigItem Name="height" Value="100%" Mode="Value" />
                        </CustomConfig>
                        <Items>
                            <ext:MenuPanel ID="MenuPanel1" runat="server">
                            <Menu ID="Menu1" runat="server">
                            <Items>
                                <ext:MenuItem Text="Gestionar" Icon="UserEdit">
                                    <Listeners>
                                        <Click Handler="addTab(#{TabPanel1}, 'Gestionar usuarios', 'Tabs/GestionarUsuarios.aspx');" />
                                    </Listeners>
                                </ext:MenuItem>
                                <%--<ext:MenuSeparator></ext:MenuSeparator>--%>
                            </Items>
                            </Menu>
                            </ext:MenuPanel>
                        </Items>
                    </ext:Panel>
                     
                </Items>
            </ext:Panel>
            
            <ext:TabPanel ID="TabPanel1" runat="server" Region="Center">
            </ext:TabPanel>

        </Items>
    </ext:Viewport>       
</form>
</body>
</html>
